package com.md.api.dao;

import com.md.api.entity.SysSwitch;
import com.md.api.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author liujie
 * @ClassName SysUserMapper
 * @Date 2022/10/27 15:37
 **/


@Repository
public interface SysUserMapper {


    int addUser(SysUser user);

    SysUser sysUserLogin(@Param("userName") String userName, @Param("password") String password);

    SysUser getById(Long userId);

    int resetPass(@Param("userIds") List<Long> userIds, @Param("password") String password);

    SysUser findByUserName(@Param("userName") String userName,@Param("status") Integer status);

    List<SysUser> userPage(@Param("userName")String userName, @Param("nickName")String nickName, @Param("status")Integer status);

    void deleteUser(@Param("userIds")List<Long> userIds);

    void updateUserStatus(SysUser user);

    void updateUser(SysUser user);


    void updatePass(SysUser user);

    List<SysSwitch> switchList();

    int handleswitch(@Param("code")String code,@Param("status") Integer status);
}
